//: Playground - noun: a place where people can play

import UIKit

//创建字典
var dic : [String : Any] = ["name": "zhangjian","age":25]

//获取value
dic["name"]

//遍历字典
for (key,value) in dic {
    print(key)
    print(value)
}

//新增key/value
dic["height"] = 180
dic

//删除key/value
dic.removeValue(forKey: "name")
dic

let dic1 :[String : Any] = ["kind": "person","number": 30]
//合并字典
for (key,value) in dic1 {
    dic[key] = value
}
dic

